from likeshop_api_project.base.mybase import Tools


class reg_model(Tools):
    # 定义路径
    path = '/api/account/register'

    # 发送注册请求
    def reg_action(self, mobile, password, client):
        reg_data = {
            "mobile": mobile,
            "password": password,
            "client": client
        }
        reg = self.huihua.post(url=self.hosturl+self.path, data=reg_data)
        return reg.json()


if __name__ == '__main__':
    import requests

    s = requests.session()
    reg = reg_model(huihua=s)
    # msg = reg.reg_action(mobile="13356786546", password="rr98765", client=2)
    msg = reg.reg_action(mobile="13345671234", password="rr1234567", client=2)
    print(msg)
